home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 31 / Amiga Format CD31 (1998-09-02)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1998-10].iso / -seriously_amiga- / sound / aplayer / files / arexx / scrollme.aplay < prev    next >
Text File  |  1998-07-16  |  1KB  |  52 lines

  1. /* This procedure will scroll a text in the main cycle window          */
  2. /*                                                                     */
  3. /* If you want to use this little procedure in your own programs, do   */
  4. /* this: Cut out the procedure starting from the line that begins with */
  5. /* 'ScrollMe: PROCEDURE' ending on 'RETURN 0' (Both lines inclusive)   */
  6. /*                                                                     */
  7. /* The procedure takes two arguments, namely <String> and <Pause>      */
  8. /* <String> is the string you want scrolled, and <Pause> is the pause  */
  9. /* in seconds between each character scroll.                           */
  10.  
  11. ADDRESS APlayer
  12. OPTIONS RESULTS
  13. SIGNAL ON HALT
  14.  
  15. GetString "Enter a scroll text"
  16. IF RC=1 THEN EXIT
  17.  
  18. string=RESULT
  19.  
  20. CALL ScrollMe string,0.08  /* This will call the procedure ScrollMe */
  21. EXIT
  22.  
  23. /* This procedure will scroll the text which you have typed */
  24.  
  25. ScrollMe: PROCEDURE
  26.     PARSE ARG text,waittime
  27.     SetCycle RexxMsg
  28.  
  29.     text=INSERT("",text,0,30," ")
  30.     counter=0
  31.  
  32.     DO UNTIL counter=LENGTH(text)+1
  33.         RexxMsg text
  34.         text=RIGHT(text,LENGTH(text)-1) || LEFT(text,1)
  35.         counter=counter+1
  36.  
  37.         CALL TIME('R')
  38.         DO UNTIL TIME('E') > waittime
  39.         END
  40.     END
  41. RETURN 0
  42.  
  43. /* 
  44.    This is the 'emergencybrake' part of this script. If you can't stop this
  45.    sucker run the program HI which is located in the RXC drawer on your
  46.    sys: partition.
  47. */
  48.  
  49. HALT:
  50. Say 'The ScrollMe.aplay script has been stopped. Hope you liked it.'
  51. EXIT
  52.